// 导入axios实例
import http from '../utils/http'

// 轮播图接口
export const getBannerList = () => http.get('/banner/list')

// 热门接口
export const getHotList = () => http.get('/pro/seckilllist?limitNum=12')

// 商品列表
export const getGoodsList = (count: number) => http.get('/pro/list?count=' + count)

// 热门搜索
export const getHotSearchList = () => http.get('/pro/hotword')

// 搜索列表
export const getSearchList = (keyword: string) => http.get('/pro/search?keyword=' + keyword)

// 分类列表
export const getCateList = () => http.get('/pro/categorylist')

// 分类列表右侧
export const getBrandList = (category: string) => http.get('/pro/categorybrandlist?category=' + category)

// 分类列表
export const getGoodsForCateAndBrand = (category: string, brand: string) => http.get('/pro/categorybrandprolist', {
    params: {
        category,
        brand,
        count: 1,
        limitNum: 10
    }
})

// 商品详情
export const getGoodsDetailHandler = (proid: string) => http.get('/pro/detail/' + proid)
